package com.hekang.fragmentdemo;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

/**
 * Created by hekang on 2018/9/9.
 */

public class FragmentValues4 extends Fragment {
    private TextView textView;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragmnet4, container, false);
        //初始化控件
        textView = view.findViewById(R.id.but_text);
        return view;
    }

    /**
     * 暴露接口
     */
    public void setFragmentTextView(String textValue){
        textView.setText(textValue);
    }

}
